home *** CD-ROM | disk | FTP | other *** search
- class TrailManager extends MovieClipHolder
- {
- var parent;
- var target;
- var trailNumber;
- var color;
- var mc;
- function TrailManager(parent, target, trailNumber, color)
- {
- super(_root.createEmptyMovieClip("trail" + _root.getNextHighestDepth(),_root.getNextHighestDepth()),_root.effects < 3 ? null : color,false,true);
- this.parent = parent;
- this.target = target;
- this.trailNumber = trailNumber;
- this.color = color;
- if(_root.effects >= 1)
- {
- this.mc.blendMode = "add";
- }
- }
- function getCoords()
- {
- var _loc2_ = new flash.geom.Point(this.target._x,this.target._y);
- this.parent.localToGlobal(_loc2_);
- return _loc2_;
- }
- function makeTrail(rot)
- {
- var _loc2_ = this.mc.attachMovie("trail" + this.trailNumber,"trail" + this.mc.getNextHighestDepth(),this.mc.getNextHighestDepth());
- var _loc3_ = this.getCoords();
- _loc2_._x = _loc3_.x;
- _loc2_._y = _loc3_.y;
- if(rot != null)
- {
- _loc2_._rotation = rot;
- }
- else
- {
- _loc2_._rotation = Math.random() * 180;
- }
- }
- function die()
- {
- this.mc.removeMovieClip();
- }
- }
-